package top.kaoshanji.p2ch06a;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import top.kaoshanji.p2ch06a.support.ReverseComparator;

import java.util.Objects;

/**
 * 代码清单 p2ch06a-10：Objects类的compare方法的使用示例
 * author kaoshanji
 * ^_^
 * create time 2025/1/17 19:03
 */
public class ObjectsExample01 {

    private static final Logger logger = LogManager.getLogger(ObjectsExample01.class);

    public static void main(String[] args) {
        logger.info("...代码清单 p2ch06a-10：Objects类的compare方法的使用示例...");

        int value = Objects.compare(41L, 9L, new ReverseComparator());
        logger.info("...value:{}...", value);

    }

}
